/*
 * @Description: 项目部管理岗位人员配置表
 */

import request, { downloadPost2 } from '@/utils/request2'
import { planProducer } from '@/api/config.js'
// const URL = {
//   listCalculateFormula: planProducer + '/lvyueFormula/queryLvyueFormulaList',
//   updateList: planProducer + '/projectManagementAttorney/updateByPrimaryKeySelective'
// }

const api = {
  /**
  * @description: 获取列表
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  listCalculateFormula: data => {
    return request({
      url: planProducer + '/lvyueFormula/queryLvyueFormulaList',
      method: 'post',
      data
    })
  },
  /**
 * @description: 获取详情
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
  getCalculateFormula: params => {
    return request({
      url: planProducer + '/lvyueFormula/getLvyueFormulaById',
      method: 'get',
      params
    })
  },
  /**
  * @description: 提交
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  updateCalculateFormula: data => {
    return request({
      url: planProducer + '/lvyueFormula/updateByPrimaryKeySelective',
      method: 'post',
      data
    })
  },
  /**
* @description: 获取列表-不考核申请
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  listNoAssessment: data => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/getPageLvyueNocheckAppy',
      method: 'post',
      data
    })
  },
  /**
* @description: 是否允许新增 1可以 0 不可用
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  getIsAddNoAssessment: params => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/checkInsert',
      method: 'get',
      params
    })
  },
  /**
* @description: 新增获取默认月份
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  getNoAssessmentMonth: params => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/getDefaultMonth',
      method: 'get',
      params
    })
  },

  /**
 * @description: 新增获取考核指标
 * @param {Object} data 接口参数
 * @return {Promise} 接口Promise
 */
  getNoAssessmentDataList: data => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/getBaseDataList',
      method: 'post',
      data
    })
  },
  /**
* @description:修改履约管理--不考核申请
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  updateNoAssessment: data => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/updateByPrimaryKeySelective',
      method: 'post',
      data
    })
  },
  /**
* @description:修改履约管理--不考核申请
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  addNoAssessment: data => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/insertSelective',
      method: 'post',
      data
    })
  },
  /**
* @description:删除--不考核申请
* @param {Object} params 接口参数
* @return {Promise} 接口Promise
*/
  delNoAssessment: params => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/deleteByPrimaryKey',
      method: 'post',
      params
    })
  },
  /**
* @description: 获取详情
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  getNoAssessment: params => {
    return request({
      url: planProducer + '/lvyueNocheckAppy/getLvyueNocheckAppyById',
      method: 'get',
      params
    })
  },
  // 项目履约-start
  /**
* @description: 项目履约列表
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  listLvyueProject: data => {
    return request({
      url: planProducer + '/lvyueProject/getPageLvyueProject',
      method: 'post',
      data
    })
  },
  /**
* @description: 获取详情
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  getLvyueProject: params => {
    return request({
      url: planProducer + '/lvyueProject/getLvyueProjectById',
      method: 'get',
      params
    })
  },
  /**
* @description:修改详情
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  updateLvyueProject: data => {
    return request({
      url: planProducer + '/lvyueProject/updateByPrimaryKeySelective',
      method: 'post',
      data
    })
  },
  // 项目履约-end

  /**
  * @description:修改表
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  updateTableList: data => {
    return request({
      url: planProducer + '/lvyueProject/getLvyueProjectKeyrateDTOList',
      method: 'post',
      data
    })
  },
  // 项目履约-end

  // 分公司履约-start
  /**
* @description: 分公司履约列表
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  listLvyueBranch: data => {
    return request({
      url: planProducer + '/lvyueBranch/getPageLvyueBranch',
      method: 'post',
      data
    })
  },
  /**
  * @description: 获取详情
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  getLvyueBranch: params => {
    return request({
      url: planProducer + '/lvyueBranch/getLvyueBranchById',
      method: 'get',
      params
    })
  },
  /**
  * @description:修改详情
  * @param {Object} data 接口参数
  * @return {Promise} 接口Promise
  */
  updateLvyueBranch: data => {
    return request({
      url: planProducer + '/lvyueBranch/updateByPrimaryKeySelective',
      method: 'post',
      data
    })
  },
  /**
* @description:修改表
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
  updateTableSwicth: data => {
    return request({
      url: planProducer + '/lvyueBranch/keyrateSortDto',
      method: 'post',
      data
    })
  },
  // 导出
  downExcel(params, fileName) {
    return downloadPost2(planProducer + '/lvyueBranch/exportExcel', null, params, fileName)
  },
  // 分公司履约-end
// 公司履约-start
  /**
* @description: 公司履约列表
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
listLvyueCom: data => {
  return request({
    url: planProducer + '/lvyueCompany/getPageLvyueCompany',
    method: 'post',
    data
  })
},
/**
* @description: 获取详情
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
getLvyueCompany: params => {
  return request({
    url: planProducer + '/lvyueCompany/getLvyueCompanyById',
    method: 'get',
    params
  })
},
/**
* @description:修改详情
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
updateLvyueCom: data => {
  return request({
    url: planProducer + '/lvyueCompany/updateByPrimaryKeySelective',
    method: 'post',
    data
  })
},
/**
* @description:修改表
* @param {Object} data 接口参数
* @return {Promise} 接口Promise
*/
updateTableSwicthCom: data => {
  return request({
    url: planProducer + '/lvyueCompany/keyrateSortDto',
    method: 'post',
    data
  })
},
// 导出
downExcelCom(params, fileName) {
  return downloadPost2(planProducer + '/lvyueCompany/exportExcel', null, params, fileName)
},
// 公司履约-end

}
export {
  api
}
